import http from "../utils/Http";
import { SecretData } from '../model/SecretModel'

export const secretList = () => {
  return http<SecretData[]>({
    method: 'post',
    url: '/secret/secretList'
  })
}

export const addSecret = (secretData:SecretData) => {
  return http({
    method: 'post',
    url: '/secret/addSecret',
    data: secretData
  })
}

export const deleteSecret = (name:string) => {
  return http({
    method: 'post',
    url: '/secret/deleteSecret',
    data: {name: name}
  })
}